name Ghengis
author KrazY_IvaN iff code xxx2xxx3xxx4 ;The iff code has been changed ; to protect my bug from specialized ; iff code attacks. raise shield generate random assign va turn right assign vb turn left if value #random <> 1 then if value #random <> 3 then assign va turn left if value #random <> 1 then if value #random <> 3 then assign vb turn right _Main: scan forward goto _Fwdscan #scan scan perimeter goto _Perscan #scan move forward if bump barrier then goto _Bar #cur_head if damage is = 0 then goto _Main lower shield if damage is > 0 then attempt repairs if damage is > 0 then attempt repairs if damage is > 0 then attempt repairs if damage is > 0 then attempt repairs if damage is > 0 then attempt repairs if damage is > 0 then attempt repairs raise shield goto _Main _Fwdscan 0: long range scan goto _Longscan #scan gosub _Orient #cur_head if bump barrier then goto _Bar #cur_head gosub _CheckDir #cur_head goto _Main _Orient 1: if value #x_pos > #enemy_x then turn left if value #x_pos < #enemy_x then turn right if value #x_pos <> #enemy_x then move forward if value #x_pos <> #enemy_x then move forward if value #x_pos <> #enemy_x then move forward if value #x_pos <> #enemy_x then move forward return _Orient 2: if value #y_pos > #enemy_y then turn left if value #y_pos < #enemy_y then turn right if value #y_pos <> #enemy_y then move forward if value #y_pos <> #enemy_y then move forward if value #y_pos <> #enemy_y then move forward if value #y_pos <> #enemy_y then move forward return _Orient 3: if value #x_pos > #enemy_x then turn right if value #x_pos < #enemy_x then turn left if value #x_pos <> #enemy_x then move forward if value #x_pos <> #enemy_x then move forward if value #x_pos <> #enemy_x then move forward if value #x_pos <> #enemy_x then move forward return _Orient 4: if value #y_pos > #enemy_y then turn right if value #y_pos < #enemy_y then turn left if value #y_pos <> #enemy_y then move forward if value #y_pos <> #enemy_y then move forward if value #y_pos <> #enemy_y then move forward if value #y_pos <> #enemy_y then move forward return _Bar 1: move backward if value #x_pos > #enemy_x then turn left if value #x_pos < #enemy_x then turn right goto _Main _Bar 2: move backward if value #y_pos > #enemy_y then turn left if value #y_pos < #enemy_y then turn right goto _Main _Bar 3: move backward if value #x_pos > #enemy_x then turn right if value #x_pos < #enemy_x then turn left goto _Main _Bar 4: move backward if value #y_pos > #enemy_y then turn right if value #y_pos < #enemy_y then turn left goto _Main _CheckDir 1: if value #x_pos > #enemy_x then turn left if value #x_pos < #enemy_x then turn right long range scan goto _Longscanr #scan return _CheckDir 2: if value #y_pos > #enemy_y then turn left if value #y_pos < #enemy_y then turn right long range scan goto _Longscanr #scan return _CheckDir 3: if value #x_pos > #enemy_x then turn right if value #x_pos < #enemy_x then turn left long range scan goto _Longscanr #scan return _CheckDir 4: if value #y_pos > #enemy_y then turn right if value #y_pos < #enemy_y then turn left long range scan goto _Longscanr #scan return _Longscan 2: if ammo is < 10 then goto _Dodge lower shield launch missile if ammo is > 9 then launch missile raise shield ~va move forward ~vb long range scan goto _Longscan #scan ~vb move forward ~va long range scan goto _Longscan #scan goto _Main _Longscanr 2: if ammo is < 10 then goto _Dodger lower shield launch missile if ammo is > 9 then launch missile raise shield ~va move forward ~vb long range scan if scan found enemy then goto _Longscanr 2 ~vb move forward ~va long range scan if scan found enemy then goto _Longscanr 2 return _Dodger: _Dodge: ~va move forward ~vb move forward move forward scan perimeter goto _Perscan #scan ~vb move forward ~va scan forward goto _Fwdscan #scan long range scan if scan found enemy then goto _Dodge goto _Main _Longscan 5: if damage is = 0 then move backward if damage is = 0 then discharge energy if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is = 0 then goto _Main if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is = 0 then goto _Main if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is = 0 then goto _Main long range scan goto _Longscan #scan goto _Main _Longscanr 5: if damage is = 0 then move backward if damage is = 0 then discharge energy if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is = 0 then return if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is = 0 then return if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is = 0 then return long range scan goto _Longscanr #scan return _Fwdscan 2: if ammo is < 3 then goto _Dodge move forward lower shield fire weapon fire weapon fire weapon fire weapon raise shield goto _Dodge _Fwdscan 5: if damage is = 0 then move backward if damage is = 0 then discharge energy if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward if damage is > 0 then move forward goto _Main _Perscan 2: if damage is > 8 then self destruct if value #enemy_d < 10 then discharge energy if value #enemy_d < 10 then discharge energy if value #enemy_d < 10 then discharge energy scan perimeter goto _Perscan #scan goto _Main _Perscan 5: scan left if scan found flag then turn left if scan found flag then goto _Fwdscan 5 scan right if scan found flag then turn right if scan found flag then goto _Fwdscan 5 ~va ~va goto _Main |